#pragma once

#include "DAEFloat3.h"
class ObjMesh;
/**
* Creates a cylinder mesh with the provided number of segments , position and height.
* @author Koen Samyn
*/ 
class CylinderMesh
{
public:
	/**
	* Creates a new CylinderMesh object with the bottom center located.
	* at the origin.
	* @param radius the radius of the cylinder.
	* @param height the height of the cylinder.
	* @param nrOfSegment the number of segments of the cylinder.
	*/
	CylinderMesh(float radius, float height, int nrOfSegments);
	/**
	* Creates a new CylinderMesh object with the bottom center located.
	* at the provided location.
	* @param origin the bottom center location of the cylinder.
	* @param radius the radius of the cylinder.
	* @param height the height of the cylinder.
	* @param nrOfSegment the number of segments of the cylinder.
	*/
	CylinderMesh(DAEFloat3 origin, float radius, float height, int nrOfSegments);

	/**
	* Destroys the CylinderMesh object.
	*/
	virtual ~CylinderMesh(void);
	/**
	* Returns the created cylinder mesh.
	* @return the mesh.
	*/
	ObjMesh* GetObjMesh()
	{
		return m_pMesh;
	}
private:
	/**
	* Creates the mesh with the current data.
	*/
	void CreateMesh();
	/**
	* The bottom center position for the cylinder.
	*/
	DAEFloat3 m_Position;
	/**
	* The radius of the cylinder.
	*/
	float m_Radius;
	/**
	* The height of the cylinder.
	*/
	float m_Height;
	/**
	* The number of segments for the cylinder.
	*/
	int m_NrOfSegments;
	/**
	* The obj mesh that was created.
	*/
	ObjMesh* m_pMesh;
};

